Optimal. Leaf size=45 \[ \frac{a^2 x^{2 n}}{2 n}+\frac{2 a b x^{3 n}}{3 n}+\frac{b^2 x^{4 n}}{4 n} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0173006, antiderivative size = 45, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.118, Rules used = {266, 43} \[ \frac{a^2 x^{2 n}}{2 n}+\frac{2 a b x^{3 n}}{3 n}+\frac{b^2 x^{4 n}}{4 n} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 266
Rule 43
Rubi steps
\begin{align*} \int x^{-1+2 n} \left (a+b x^n\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int x (a+b x)^2 \, dx,x,x^n\right )}{n}\\ &=\frac{\operatorname{Subst}\left (\int \left (a^2 x+2 a b x^2+b^2 x^3\right ) \, dx,x,x^n\right )}{n}\\ &=\frac{a^2 x^{2 n}}{2 n}+\frac{2 a b x^{3 n}}{3 n}+\frac{b^2 x^{4 n}}{4 n}\\ \end{align*}
Mathematica [A] time = 0.0137636, size = 35, normalized size = 0.78 \[ \frac{x^{2 n} \left (6 a^2+8 a b x^n+3 b^2 x^{2 n}\right )}{12 n} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.013, size = 46, normalized size = 1. \begin{align*}{\frac{{a}^{2} \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{2}}{2\,n}}+{\frac{{b}^{2} \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{4}}{4\,n}}+{\frac{2\,ab \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{3}}{3\,n}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.985065, size = 76, normalized size = 1.69 \begin{align*} \frac{3 \, b^{2} x^{4 \, n} + 8 \, a b x^{3 \, n} + 6 \, a^{2} x^{2 \, n}}{12 \, n} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 14.1755, size = 44, normalized size = 0.98 \begin{align*} \begin{cases} \frac{a^{2} x^{2 n}}{2 n} + \frac{2 a b x^{3 n}}{3 n} + \frac{b^{2} x^{4 n}}{4 n} & \text{for}\: n \neq 0 \\\left (a + b\right )^{2} \log{\left (x \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b x^{n} + a\right )}^{2} x^{2 \, n - 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]